ABC124 C - Coloring Colorfully
https://atcoder.jp/contests/abc124/tasks/abc124_c
提出
code: python
s = input()
except_s_1 =
'0'
* len(s)
except_s_2 =
'1'
* len(s)
for i in range(0, len(s), 2):
except_s_1
i
= '1'
except_s_2
i
= '0'
change_1 = 0
change_2 = 0
for i in range(len(s)):
if (s
i
!= except_s_1
i
):
change_1 += 1
if (s
i
!= except_s_2
i
):
change_2 += 1
print(min(change_1, change_2))